Skip to main content
This forum is closed to new posts and responses. Individual names altered for privacy purposes. The information contained in this website is provided for informational purposes only and should not be construed as a forum for customer support requests. Any customer support requests should be directed to the official HCL customer support channels below:

HCL Software Customer Support Portal for U.S. Federal Government clients
HCL Software Customer Support Portal

Notes/Domino 6 and 7 Forum

Notes/Domino 6 and 7 Forum


  

PreviousPrevious NextNext

RE: Move a directory on file server
~Bill Quetfoochekakol 23.Dec.03 03:20 PM a Web browser
Domino Designer All Releases Windows 2000


Hi Dan,

I forgot about MOVE not being an external command (MOVE.exe), but that shouldn't prevent you from using it.
You can execute it via a batch (.BAT) file, which you can create programatically.

Here is some example code, that I've thrown together for you. It might well be done much simpler, but it works ;-)

Sub Click(Source As Button)
Dim temp As String
Dim cmd As String
Dim src As String, dst As String
Dim result As Integer
Dim fileNum As Integer
temp = Environ("TEMP")
Print "Using temp = " & temp

' creating command line command
src = temp & "\*.htm" ' source file spec
dst = temp & "\Backup" ' destination directory
cmd = "MOVE /Y " &src & " " & dst

' creating batch file
bat = temp & "\MyMove.BAT"
fileNum = Freefile()
Open bat For Output As #fileNum
Print #fileNum, cmd
' Print #fileNum, "PAUSE" ' allows you to view the console for possibly error messages
Close #fileNum

Print "Shelling batch file: " & bat
result = Shell(bat, 1) ' 1 = normal with focus, 6 = minimized without focus
If result <>33 Then
Error 9999, "Error " & result & " from shell command: " & cmd
End If
End Sub




Move a directory on file server (~Hank Quetrepul... 22.Dec.03)
. . RE: Move a directory on file server... (~Bill Quetfooch... 22.Dec.03)
. . . . RE: Move a directory on file server... (~Hank Quetrepul... 23.Dec.03)
. . . . . . RE: Move a directory on file server... (~Bill Quetfooch... 23.Dec.03)
. . . . . . . . Good Idea! (~Hank Quetrepul... 23.Dec.03)


Document Options






  Document options
Print this pagePrint this page

Search this forum

Forum views and search


  Forum views and search
Date (threaded)
Date (flat)
With excerpt
Category
Platform
Release
Advanced search

Member Tools


RSS Feeds

 RSS feedsRSS
All forum posts RSS
All main topics RSS